//
//  SLTableViewController.m
//  chatAI
//
//  Created by 陈镇 on 2023/4/21.
//

#import "SLTableViewController.h"

@interface SLTableViewController ()

@end

@implementation SLTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.statusBarStyle = UIStatusBarStyleLightContent;
    // Do any additional setup after loading the view.
//    self.view.backgroundColor = UIColorWhite;
    
    self.edgesForExtendedLayout = UIRectEdgeAll;
    
    
    if (@available(iOS 15.0, *)) {
        self.tableView.sectionHeaderTopPadding = 0;
    }
    
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH , 40)];
}


/// navigationHidden默认为NO,为YES时隐藏导航栏.
/// 使用"setNavigationBarHidden:animated:"方法可调起NavigationBar转场动画.
/// @param animated 是否使用了动画
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
//    [self.navigationController setNavigationBarHidden:self.lh_navigationHidden animated:animated];
    
}
- (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle {
    _statusBarStyle = statusBarStyle;
    [self setNeedsStatusBarAppearanceUpdate];
}
-(UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleDefault;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 0.00001;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 0.00001;
}
-(BOOL)shouldHideKeyboardWhenTouchInView:(UIView *)view{
    return YES;
}
-(void)layoutTableView{
    self.tableView.frame = CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, SCREEN_HEIGHT - NavigationContentTop);
}
@end
